// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/12/2015 10:46:27 PM				
// -----------------------------

#ifndef _CWindow_h
#define _CWindow_h

#include "IWindow.h"

namespace Flow
{

	class CWindow : public IWindow
	{
	public:
		CWindow();
		virtual ~CWindow();

		virtual void	Release();

		virtual Bool	Initialize(const GameConfig& config);
		virtual void	Close();

		virtual Bool	HandleMessages(ProcessOption::Enum type) const;

		virtual Bool	IsAlive() const;
		virtual Bool	IsVisible() const;

		virtual HWND	GetHandle() const;
		virtual UInt32	GetWidth() const;
		virtual UInt32	GetHeight() const;

	private:

		static LRESULT WINAPI	WndProcWrapper(HWND hWindow, UINT uMessage, WPARAM wParam, LPARAM lParam);
		LRESULT					WndProc(HWND hWindow, UINT uMessage, WPARAM wParam, LPARAM lParam);

		HWND	m_hWindow;

		Bool	m_IsAlive;
		Bool	m_IsVisible;

		UInt32	m_Width;
		UInt32	m_Height;

		CWindow(const CWindow& refCWindow);
		CWindow& operator=(const CWindow& refCWindow);
	};

}

#include "ExportMacro.h"
EXPORT_IMPLEMENTATION(Window);

#endif